package cat.music.ut.viewmodel

import androidx.lifecycle.MutableLiveData
import androidx.lifecycle.ViewModel
import androidx.lifecycle.viewModelScope
import cat.music.ut.CatApp
import com.alibaba.fastjson.JSON
import kotlinx.coroutines.Dispatchers
import kotlinx.coroutines.launch

open class BaseViewModel : ViewModel() {
    val sp by lazy { CatApp.getInstance().getSp() }
    fun coroutinesHttp(execute: suspend () -> Unit) {
        viewModelScope.launch(Dispatchers.IO) {
            execute.invoke()
        }
    }

}